package com.freewater.cargotracker.application;

import com.freewater.cargotracker.domain.model.cargo.Itinerary;
import com.freewater.cargotracker.domain.model.cargo.TrackingId;
import com.freewater.cargotracker.domain.model.location.UnLocode;

import java.time.LocalDateTime;
import java.util.List;

public interface BookingService {

    /**
     * 客户新增一个货物到货物追踪系统，未规划航行日程
     *
     * @param origin
     * @param destination
     * @param arrivalDeadline
     * @return
     */
    TrackingId bookNewCargo(UnLocode origin, UnLocode destination, LocalDateTime arrivalDeadline);

    /**
     * 为货物返回满足要求的航行日程安排
     *
     * @param trackingID
     * @return
     */
    List<Itinerary> requestPossibleRoutesForCargo(TrackingId trackingID);

    /**
     * 为货物绑定航行日程安排
     *
     * @param trackingID
     * @param itinerary
     */
    void assignCargoToRoute(TrackingId trackingID, Itinerary itinerary);

}
